﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcMall.AdminPortal.Controllers.ArticleCategory.ViewModels;
using MvcMall.Core.Commands;
using MvcMall.Framework.Mapper;

namespace MvcMall.AdminPortal.Controllers.ArticleCategory.Mappers
{
    public class ArticleCategoryCommandMapper : BaseMapper<ArticleCategoryModel, ArticleCategoryCommand>, IMapper<ArticleCategoryModel, ArticleCategoryCommand>
    {
        #region IMapper<User,UserViewModel> Members

        public override ArticleCategoryCommand MapFrom(ArticleCategoryModel input)
        {
            var viewModel = base.MapFrom(input);
            if (input != null)
            {
                viewModel.ArticleCategoryId = input.ArticleCategoryId;
            }
            return viewModel;
        }

        #endregion
    }
}
